package com.dragon.modules.yuegou.model.product;

import com.dragon.modules.yuegou.entity.product.GrouponEntity;
import com.dragon.modules.yuegou.enums.product.GrouponStatus;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 团购表模型类
 * 
 * @author pbuilder generated
 * @date 2019-10-08 14:15:24
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class Groupon extends GrouponEntity {

    //昵称
	private String nickName;
	//剩余成团人数
	private Integer leftGrouponNum;
	//图像
	private String headImg;

	/**
	 * 图像
	 * @return
	 */
	public String getHeadImg() {
		return headImg;
	}

	public void setHeadImg(String headImg) {
		this.headImg = headImg;
	}

	/**
	 * 昵称
	 * @return
	 */
	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	/**
	 * 仅差几个成团
	 * @return
	 */
	public Integer getLeftGrouponNum() {
		return leftGrouponNum;
	}

	public void setLeftGrouponNum(Integer leftGrouponNum) {
		this.leftGrouponNum = leftGrouponNum;
	}

	/**
	 * 构造一个空团购表模型对象
	 */
	public Groupon(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个团购表模型对象
	 * 
	 * @param entity 实体对象
	 */
	public Groupon(GrouponEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个团购表模型对象
	 * 
	 * @param other 其它对象
	 */
	public Groupon(Groupon other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置主键ID
	 * 
	 * @param id 主键ID
	 * @return 当前对象
	 */
    public Groupon id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置商圈ID
	 * 
	 * @param busdId 商圈ID
	 * @return 当前对象
	 */
    public Groupon busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
    public Groupon merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public String getGrouponInfoId() {
    	return grouponInfoId;
    }

    /**
	 * 设置拼团活动信息ID
	 * 
	 * @param grouponInfoId 拼团活动信息ID
	 * @return 当前对象
	 */
    public Groupon grouponInfoId(String grouponInfoId) {
    	this.grouponInfoId = grouponInfoId;
    	return this;
    }

	@Override
	public String getSkuId() {
    	return skuId;
    }

    /**
	 * 设置拼团skuID
	 * 
	 * @param skuId 拼团skuID
	 * @return 当前对象
	 */
    public Groupon skuId(String skuId) {
    	this.skuId = skuId;
    	return this;
    }

	@Override
	public LocalDateTime getBuyTime() {
    	return buyTime;
    }

    /**
	 * 设置购买时间
	 * 
	 * @param buyTime 购买时间
	 * @return 当前对象
	 */
    public Groupon buyTime(LocalDateTime buyTime) {
    	this.buyTime = buyTime;
    	return this;
    }

	@Override
	public GrouponStatus getStatus() {
    	return status;
    }

    /**
	 * 设置[枚举]状态：0-未成团-NO_SUCCESS、1-已成团-SUCCESS
	 * 
	 * @param status [枚举]状态：0-未成团-NO_SUCCESS、1-已成团-SUCCESS
	 * @return 当前对象
	 */
    public Groupon status(GrouponStatus status) {
    	this.status = status;
    	return this;
    }

	@Override
	public Integer getJoinNum() {
    	return joinNum;
    }

    /**
	 * 设置参团人数
	 * 
	 * @param joinNum 参团人数
	 * @return 当前对象
	 */
    public Groupon joinNum(Integer joinNum) {
    	this.joinNum = joinNum;
    	return this;
    }

	@Override
	public Long getOwner() {
    	return owner;
    }

    /**
	 * 设置发起人ID
	 * 
	 * @param owner 发起人ID
	 * @return 当前对象
	 */
    public Groupon owner(Long owner) {
    	this.owner = owner;
    	return this;
    }

	@Override
	public LocalDateTime getCreateTime() {
    	return createTime;
    }

    /**
	 * 设置发起时间
	 * 
	 * @param createTime 发起时间
	 * @return 当前对象
	 */
    public Groupon createTime(LocalDateTime createTime) {
    	this.createTime = createTime;
    	return this;
    }

	@Override
	public Boolean getIsExpire() {
    	return isExpire;
    }

    /**
	 * 设置是否过期:0:否 1:是
	 * 
	 * @param isExpire 是否过期:0:否 1:是
	 * @return 当前对象
	 */
    public Groupon isExpire(Boolean isExpire) {
    	this.isExpire = isExpire;
    	return this;
    }

	@Override
	public Boolean getIsSingleBuy() {
    	return isSingleBuy;
    }

    /**
	 * 设置是否单独购买 0否 1是
	 * 
	 * @param isSingleBuy 是否单独购买 0否 1是
	 * @return 当前对象
	 */
    public Groupon isSingleBuy(Boolean isSingleBuy) {
    	this.isSingleBuy = isSingleBuy;
    	return this;
    }
}
